var sum = 0;
var count = 0;
for (var i = 2; i < 101; i += 2) {
    // i: 2, 4, 6, ..., 100
    sum += i;
    count++;
}

console.log(sum / count);
